<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>uCXpresso.BLE: CBus Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../upnp.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">uCXpresso.BLE
   &#160;<span id="projectnumber">v1.0.4</span>
   </div>
   <div id="projectbrief">RTOS C++ Framework for Bluetooth Low Energy</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="../../hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('de/d89/class_c_bus.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../d1/d38/class_c_bus-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">CBus Class Reference<div class="ingroups"><a class="el" href="../../d1/d6c/group___peripherals.html">Peripherals</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &quot;<a class="el" href="../../d4/d9b/bus_8h_source.html">class/bus.h</a>&quot;</code></p>
<div class="dynheader">
Inheritance diagram for CBus:</div>
<div class="dyncontent">
 <div class="center">
  <img src="../../de/d89/class_c_bus.png" usemap="#CBus_map" alt=""/>
  <map id="CBus_map" name="CBus_map">
<area href="../../d9/db6/class_c_peripheral.html" alt="CPeripheral" shape="rect" coords="0,56,80,80"/>
<area href="../../dc/dac/class_c_object.html" alt="CObject" shape="rect" coords="0,0,80,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5f859ac1582a6cbe9b5b420c6c051e63"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#a5f859ac1582a6cbe9b5b420c6c051e63">CBus</a> (<a class="el" href="../../db/dff/group___enumerations.html#ga65a2241721e4acb573e0c3fe29ac432f">PIN_NAME_T</a> <a class="el" href="../../de/d89/class_c_bus.html#a94da38619defc1c41c16c04c4c7991f8">pin</a>,...)</td></tr>
<tr class="separator:a5f859ac1582a6cbe9b5b420c6c051e63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a15e443f8f87426bcd30f9b627fe1c7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#a1a15e443f8f87426bcd30f9b627fe1c7">output</a> (<a class="el" href="../../db/dff/group___enumerations.html#gac16e35b75166ad7286b8bb78bd244ed2">PIN_OUTPUT_MODE_T</a> mode=<a class="el" href="../../db/dff/group___enumerations.html#ggac16e35b75166ad7286b8bb78bd244ed2afd68b1a66f2a33ce77d4f6c7f8fc998a">NOT_OPEN</a>, <a class="el" href="../../db/dff/group___enumerations.html#ga6f24594071a026b31238ab8cb80d6a80">PIN_LEVEL_T</a> defValue=<a class="el" href="../../db/dff/group___enumerations.html#gga6f24594071a026b31238ab8cb80d6a80a6a226f4143ca3b18999551694cdb72a8">LOW</a>)</td></tr>
<tr class="separator:a1a15e443f8f87426bcd30f9b627fe1c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad45a06493f12aef3d096ac3ed86a3b8f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#ad45a06493f12aef3d096ac3ed86a3b8f">input</a> (<a class="el" href="../../db/dff/group___enumerations.html#ga9f8f32709b482732d6e377ff26da36ef">PIN_INPUT_MODE_T</a> mode=<a class="el" href="../../db/dff/group___enumerations.html#gga9f8f32709b482732d6e377ff26da36efa781a7f23ae9b0dbdc6edfdcfd3be75df">INTERNAL_PULL_UP</a>)</td></tr>
<tr class="separator:ad45a06493f12aef3d096ac3ed86a3b8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4852669ff7ae53e68cf125aa49a87bd0"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#a4852669ff7ae53e68cf125aa49a87bd0">write</a> (uint32_t val)</td></tr>
<tr class="separator:a4852669ff7ae53e68cf125aa49a87bd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5c9d649c6f6b22a93fb29e0152a57c1"><td class="memItemLeft" align="right" valign="top">virtual uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#ae5c9d649c6f6b22a93fb29e0152a57c1">read</a> ()</td></tr>
<tr class="separator:ae5c9d649c6f6b22a93fb29e0152a57c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94da38619defc1c41c16c04c4c7991f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/db9/class_c_pin.html">CPin</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#a94da38619defc1c41c16c04c4c7991f8">pin</a> (int index)</td></tr>
<tr class="separator:a94da38619defc1c41c16c04c4c7991f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add3835bd7327b63bdaa480938d5a8adc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#add3835bd7327b63bdaa480938d5a8adc">operator uint32_t</a> ()</td></tr>
<tr class="separator:add3835bd7327b63bdaa480938d5a8adc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f639b395906de4549c51deb0a0ad79c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#a9f639b395906de4549c51deb0a0ad79c">operator=</a> (uint32_t val)</td></tr>
<tr class="separator:a9f639b395906de4549c51deb0a0ad79c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55d1c493025b37e0f34801b8ced31068"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#a55d1c493025b37e0f34801b8ced31068">operator==</a> (uint32_t val)</td></tr>
<tr class="separator:a55d1c493025b37e0f34801b8ced31068"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ea59ccbb16b92e2763a00b3baa10fd6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#a3ea59ccbb16b92e2763a00b3baa10fd6">operator!=</a> (uint32_t val)</td></tr>
<tr class="separator:a3ea59ccbb16b92e2763a00b3baa10fd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12e4d076164971de589cbc5b2f6537e2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/db9/class_c_pin.html">CPin</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#a12e4d076164971de589cbc5b2f6537e2">operator[]</a> (int index)</td></tr>
<tr class="separator:a12e4d076164971de589cbc5b2f6537e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fa0e4c537c237278fe8092f4d8e26fb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d89/class_c_bus.html#a4fa0e4c537c237278fe8092f4d8e26fb">count</a> ()</td></tr>
<tr class="separator:a4fa0e4c537c237278fe8092f4d8e26fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26a76c241a4d62d2efdac57d2cfe4c0f"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/dac/class_c_object.html#a26a76c241a4d62d2efdac57d2cfe4c0f">isThread</a> ()</td></tr>
<tr class="separator:a26a76c241a4d62d2efdac57d2cfe4c0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A digital input/output bus, used for reading/writing the state of a collection of pins. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d4/d70/_2ble_2ble_heartrate_2src_2main_8cpp-example.html#_a3">/ble/ble_heartrate/src/main.cpp</a>, <a class="el" href="../../d5/df3/_2ble_2ble_multiple_2src_2main_8cpp-example.html#_a0">/ble/ble_multiple/src/main.cpp</a>, <a class="el" href="../../d5/dec/_2peripheral_2adc_2src_2main_8cpp-example.html#_a5">/peripheral/adc/src/main.cpp</a>, <a class="el" href="../../de/dd2/_2peripheral_2eeprom_2src_2main_8cpp-example.html#_a5">/peripheral/eeprom/src/main.cpp</a>, <a class="el" href="../../df/dd4/_2peripheral_2i2c_scanner_2src_2main_8cpp-example.html#_a5">/peripheral/i2c_scanner/src/main.cpp</a>, <a class="el" href="../../d5/d72/_2peripheral_2spi_2src_2main_8cpp-example.html#_a5">/peripheral/spi/src/main.cpp</a>, <a class="el" href="../../d3/d38/_2peripheral_2timer_2src_2main_8cpp-example.html#_a5">/peripheral/timer/src/main.cpp</a>, and <a class="el" href="../../d0/d46/_2peripheral_2watchdog_2src_2main_8cpp-example.html#_a2">/peripheral/watchdog/src/main.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5f859ac1582a6cbe9b5b420c6c051e63"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CBus::CBus </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/dff/group___enumerations.html#ga65a2241721e4acb573e0c3fe29ac432f">PIN_NAME_T</a>&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="../../de/d89/class_c_bus.html">CBus</a> object to connect to the specified pins. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>... are PIN_NAME_T to specified one or more pins to the <a class="el" href="../../de/d89/class_c_bus.html">CBus</a>.</td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">Example:</div>
<div class="line">        <a class="code" href="../../de/d89/class_c_bus.html">CBus</a> bus(<a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa19b235491a16a3e7f91872f46a33a4a6">P21</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa7010befcbd538e2d53cf35755cbc4663">P22</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fac7bf4234043357a0b854b3818a8d33e6">P23</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa98300b37c344c1c3e73a3f9ddb160bab">P24</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fadc6f24fd6915a3f2786a1b7045406924">END</a>);  <span class="comment">// Collect P21~P24 in the CBus object.</span></div>
<div class="line">        bus.output();                       <span class="comment">// Set the bus as output pins.</span></div>
</div><!-- fragment --> <dl class="section remark"><dt>Remarks</dt><dd>'END' of the pin arguments is MUST!! </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a4fa0e4c537c237278fe8092f4d8e26fb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int CBus::count </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call the member function to retrieve the number of pins in the bus. </p>
<dl class="section return"><dt>Returns</dt><dd>integer value. </dd></dl>

</div>
</div>
<a class="anchor" id="ad45a06493f12aef3d096ac3ed86a3b8f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CBus::input </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/dff/group___enumerations.html#ga9f8f32709b482732d6e377ff26da36ef">PIN_INPUT_MODE_T</a>&#160;</td>
          <td class="paramname"><em>mode</em> = <code><a class="el" href="../../db/dff/group___enumerations.html#gga9f8f32709b482732d6e377ff26da36efa781a7f23ae9b0dbdc6edfdcfd3be75df">INTERNAL_PULL_UP</a></code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call the member function to set the bus as input pins </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mode</td><td>is a PIN_INPUT_MODE_T, default is INTERNAL_PUTT_UP. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a26a76c241a4d62d2efdac57d2cfe4c0f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool CObject::isThread </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Check current object that inherits from <a class="el" href="../../d0/d26/class_c_thread.html">CThread</a> class or not. </p>
<dl class="section note"><dt>Note</dt><dd>The isTherad() will be override by <a class="el" href="../../d0/d26/class_c_thread.html">CThread</a> class. </dd></dl>

<p>Reimplemented in <a class="el" href="../../d0/d26/class_c_thread.html#ab2513fd0fcad30e2e6605609c91f1984">CThread</a>.</p>

</div>
</div>
<a class="anchor" id="add3835bd7327b63bdaa480938d5a8adc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CBus::operator uint32_t </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>A shorthand for read</p>
<div class="fragment"><div class="line">Example:</div>
<div class="line">        <a class="code" href="../../de/d89/class_c_bus.html">CBus</a> bus(<a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa19b235491a16a3e7f91872f46a33a4a6">P21</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa7010befcbd538e2d53cf35755cbc4663">P22</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fac7bf4234043357a0b854b3818a8d33e6">P23</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa98300b37c344c1c3e73a3f9ddb160bab">P24</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fadc6f24fd6915a3f2786a1b7045406924">END</a>);  <span class="comment">// Collect P21~P24 in the CBus object.</span></div>
<div class="line">        bus.input();                        <span class="comment">// Set the bus as input pins.</span></div>
<div class="line">        uint32_t val = bus;                 <span class="comment">// Read a value from bus.</span></div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="a3ea59ccbb16b92e2763a00b3baa10fd6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CBus::operator!= </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>A shorthand for not equal to... </p>
<dl class="section return"><dt>Returns</dt><dd>true if the bus not equal the val; otherwise, failed. </dd></dl>

</div>
</div>
<a class="anchor" id="a9f639b395906de4549c51deb0a0ad79c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CBus::operator= </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>A shorthand for write</p>
<div class="fragment"><div class="line">Example:</div>
<div class="line">        <a class="code" href="../../de/d89/class_c_bus.html">CBus</a> bus(<a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa19b235491a16a3e7f91872f46a33a4a6">P21</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa7010befcbd538e2d53cf35755cbc4663">P22</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fac7bf4234043357a0b854b3818a8d33e6">P23</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa98300b37c344c1c3e73a3f9ddb160bab">P24</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fadc6f24fd6915a3f2786a1b7045406924">END</a>);  <span class="comment">// Collect P21~P24 in the CBus object.</span></div>
<div class="line">        bus.output();                       <span class="comment">// Set the bus as output pins.</span></div>
<div class="line">        bus = 0x05;                         <span class="comment">// Write 0x05 to bus.</span></div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="a55d1c493025b37e0f34801b8ced31068"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CBus::operator== </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>A shorthand for equal to... </p>
<dl class="section return"><dt>Returns</dt><dd>true if the bus==val, otherwise, failed. </dd></dl>

</div>
</div>
<a class="anchor" id="a12e4d076164971de589cbc5b2f6537e2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/db9/class_c_pin.html">CPin</a>&amp; CBus::operator[] </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>A shorthand for array </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../d7/db9/class_c_pin.html">CPin</a></dd></dl>
<div class="fragment"><div class="line">Example:</div>
<div class="line">        <a class="code" href="../../de/d89/class_c_bus.html">CBus</a> bus(<a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa19b235491a16a3e7f91872f46a33a4a6">P21</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa7010befcbd538e2d53cf35755cbc4663">P22</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fac7bf4234043357a0b854b3818a8d33e6">P23</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fa98300b37c344c1c3e73a3f9ddb160bab">P24</a>, <a class="code" href="../../db/dff/group___enumerations.html#gga65a2241721e4acb573e0c3fe29ac432fadc6f24fd6915a3f2786a1b7045406924">END</a>);  <span class="comment">// Collect P21~P24 in the CBus object.</span></div>
<div class="line">        bus.output();                       <span class="comment">// Set the bus as output pins.</span></div>
<div class="line">    bus[2] = <a class="code" href="../../db/dff/group___enumerations.html#gga6f24594071a026b31238ab8cb80d6a80a6a226f4143ca3b18999551694cdb72a8">LOW</a>;                       <span class="comment">// Set P23 is LOW.</span></div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="a1a15e443f8f87426bcd30f9b627fe1c7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CBus::output </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/dff/group___enumerations.html#gac16e35b75166ad7286b8bb78bd244ed2">PIN_OUTPUT_MODE_T</a>&#160;</td>
          <td class="paramname"><em>mode</em> = <code><a class="el" href="../../db/dff/group___enumerations.html#ggac16e35b75166ad7286b8bb78bd244ed2afd68b1a66f2a33ce77d4f6c7f8fc998a">NOT_OPEN</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../db/dff/group___enumerations.html#ga6f24594071a026b31238ab8cb80d6a80">PIN_LEVEL_T</a>&#160;</td>
          <td class="paramname"><em>defValue</em> = <code><a class="el" href="../../db/dff/group___enumerations.html#gga6f24594071a026b31238ab8cb80d6a80a6a226f4143ca3b18999551694cdb72a8">LOW</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call the member function to set the bus as output pins. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mode</td><td>is a PIN_OUTPUT_MODE_T, default is OPEN_DRAIN (provide current). </td></tr>
    <tr><td class="paramname">defValue</td><td>to the the default PIN_LEVEL_T to initialize the output pin. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a94da38619defc1c41c16c04c4c7991f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/db9/class_c_pin.html">CPin</a>&amp; CBus::pin </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call the member function to retrieve a identity pin from bus. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../d7/db9/class_c_pin.html">CPin</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ae5c9d649c6f6b22a93fb29e0152a57c1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint32_t CBus::read </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call the member function to retrieve a value from pins. </p>
<dl class="section return"><dt>Returns</dt><dd>a unsigned integer value that map the bit-wide of pins. </dd></dl>

</div>
</div>
<a class="anchor" id="a4852669ff7ae53e68cf125aa49a87bd0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CBus::write </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call the member function to write a value to the bus. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">val</td><td>is a unsigned integer to map the bit wide value to pins. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../de/d89/class_c_bus.html">CBus</a></li>
    <li class="footer">Generated on Fri Apr 11 2014 23:43:26 for uCXpresso.BLE by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
